package com.nf.action;

import com.nf.service.TestService;
import com.nf.service.TestServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TestAction {

    @Autowired
    private TestService testService;
    //private TestService testService = new TestServiceImpl();

    @RequestMapping("/abc")
    public String xxx(Model model,int accountId){
        System.out.println("获得客户端输入的账号ID:"+accountId);
        //model.addAttribute("kkk","88美元"); 写死
        System.out.println( testService );
        model.addAttribute("kkk",  testService.getString(accountId)  );
        return "a1";
    }

}
